
import React, { Component } from 'react';
import Myheader  from '../../components/goods/Myheader'
import Mylist from '../../components/goods/Mylist';
// import MyTabbar from './components/MyTabbar';
import logo from '../../assets/logo192.png'


class App extends Component {
  constructor(props){
     super(props);
     this.state = {
      currentIndex:0,
      kindlist:[
        {name:"综合"},
        {name:"销量"},
        {name:"新品"},
        {name:"价格"},
        {name:"筛选"},
    ],
    list:[
      {pic:logo,name:'化妆品',price:'原价￥309',buyprice:'￥195',sale:1220},
      {pic:logo,name:'化妆品',price:'原价￥309',buyprice:'￥195',sale:12},
      {pic:logo,name:'化妆品',price:'原价￥309',buyprice:'￥195',sale:123},
      {pic:logo,name:'化妆品',price:'原价￥309',buyprice:'￥195',sale:1234},
      {pic:logo,name:'化妆品',price:'原价￥309',buyprice:'￥195',sale:12345},
      {pic:logo,name:'化妆品',price:'原价￥309',buyprice:'￥195',sale:1211},
  ]
     }
  }
  handleClick(index){
    this.setState({
      currentIndex:index
    })
  }
  render() {
    return (
      <div>
        <Myheader kindlist={this.state.kindlist} list={this.state.list}></Myheader>
        <Mylist kindlist={this.state.kindlist} list={this.state.list} handleClick={this.handleClick.bind(this)}></Mylist>
        {/* <MyTabbar></MyTabbar> */}
      </div>
    );
  }
}

export default App;